package com.dms.modules.product.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.experimental.Accessors;

import java.math.BigDecimal;
import java.time.LocalDateTime;

/**
 * 商品分析实体类
 */
@Data
@Accessors(chain = true)
@TableName("product_analytics")
@ApiModel(value = "商品分析实体", description = "商品分析数据")
public class ProductAnalytics {

    @ApiModelProperty("分析ID")
    @TableId(type = IdType.AUTO)
    private Long id;

    @ApiModelProperty("商品ID")
    private Long productId;

    @ApiModelProperty("浏览次数")
    private Integer viewCount;

    @ApiModelProperty("点击次数")
    private Integer clickCount;

    @ApiModelProperty("收藏次数")
    private Integer favoriteCount;

    @ApiModelProperty("加入购物车次数")
    private Integer cartCount;

    @ApiModelProperty("购买次数")
    private Integer purchaseCount;

    @ApiModelProperty("转化率")
    private BigDecimal conversionRate;

    @ApiModelProperty("平均停留时间(秒)")
    private Integer avgStayTime;

    @ApiModelProperty("统计日期")
    private LocalDateTime analyticsDate;

    @ApiModelProperty("创建时间")
    private LocalDateTime createTime;

    @ApiModelProperty("更新时间")
    private LocalDateTime updateTime;
} 